package org.javaboy.meeting.mapper;

import org.apache.ibatis.annotations.Param;
import org.javaboy.meeting.model.Employee;
import org.javaboy.meeting.model.Meeting;

import java.util.List;

public interface MeetingMapper {
    Integer addMeeting(Meeting meeting);

    void addParticipants(@Param("meetingid") Integer meetingid, @Param("mps") Integer[] mps);

    List<Meeting> getAllMeetings(@Param("meeting") Meeting meeting, @Param("page") Integer page, @Param("pagesize") Integer pageSize);

    Long getTotal(Meeting meeting);

    Meeting getMeetingById(Integer meetingid);

    List<Meeting> getMyMeetingByEmpId(Integer employeeid);

    List<Meeting> getMyBookingByEmpId(@Param("employeeid") Integer employeeid, @Param("status") Integer status);

    List<Meeting> getCancelMeetingsByStatus(Integer cancelStatus);

    //分页新增
    List<Meeting> getMeetingsbyPage(@Param("start") Integer start, @Param("size") Integer size);

    Integer getCount();

    List<Meeting> searchMeetingsbyPage(@Param("start") int start, @Param("size") Integer size,
                                       @Param("meetingname") String meetingname, @Param("roomid") String roomid,
                                       @Param("reservername") String reservername);

    Integer getSearchCount(@Param("meetingname") String meetingname, @Param("roomid") String roomid,
                           @Param("reservername") String reservername);

    List<Meeting> getMeetingByRoomId(Integer roomid);
}
